package com.hoshiicloud.fileserver.service;

import com.hoshiicloud.fileserver.model.CreateBucketRequest;
import com.obs.services.model.BucketStorageInfo;
import com.obs.services.model.ObsBucket;

import java.util.List;

/**
 * 存储空间操作服务接口类
 * @author Mr.wu
 *
 */
public interface BucketService {
	/**
	 * 创建一个存储空间
	 * @param param
	 * @return
	 * @throws Exception 
	 */
	public boolean createBucket(CreateBucketRequest param) throws Exception;
	
	/**
	 * 获取所有存储空间的列表
	 * @return
	 */
	public List<ObsBucket> getBucketList() throws Exception;
	
	/**
	 * 根据存储空间名称删除一个存储空间
	 * @param bucketName
	 * @return
	 */
	public boolean deleteBucket(String bucketName);
	
	/**
	 * 根据名称获取存储空间的存量信息
	 * @param bucketName
	 * @return
	 */
	public BucketStorageInfo getBucketStorageInfo(String bucketName);

	void test() throws Exception;
}
